#!/usr/bin/python
from config import Config, ConfigError
def configFile(config_file):
    try:
        config = Config(config_file)
        return config
    except ConfigError, e:
        print("%s" % e)
        sys.exit(1)


config = configFile("my.conf")
print config.database
#f = file('my2.conf', 'w')
#config = configFile("my2.conf")
#
#database = {
#    "host" : "localhost",
#    "viertabani_adi" : "deneme",
#    "veritbanai_parola" : "parola"
#}
#config.database = database
#config.save(f)
